package com.wider.utils;

import cn.hutool.core.util.StrUtil;

import java.text.ParseException;
import java.util.Random;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class U extends StrUtil {

	public static final ExecutorService cachedThreadPool = Executors.newCachedThreadPool();
    public static Random random = new Random();

	public static boolean numInTang(double start, double end, Object data) {

		if(data instanceof Float){
			Float d = (Float)data;
			if(d > end)return false;
			if(d < start)return false;
		}
		if(data instanceof Integer){
			Integer d = (Integer)data;
			if(d > end)return false;
			if(d < start)return false;
		}
		if(data instanceof Long){
			Long d = (Long)data;
			if(d > end)return false;
			if(d < start)return false;
		}
		if(data instanceof Double){
			Double d = (Double)data;
			if(d > end)return false;
			if(d < start)return false;
		}
		if(data instanceof Short){
			Short d = (Short)data;
			if(d > end)return false;
			if(d < start)return false;
		}

		return true;

	}

	public static boolean isEnglish(String charaString){
		return charaString.matches("^[a-zA-Z]*");
	}
}
